package cn.itcast.bos.web.Dao.teke_delivary;

import java.util.List;


import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.bos.domain.system.Menu;

public interface MenuRepository extends JpaRepository<Menu, Integer> {

	// 动态显示菜单
	@Query("from Menu m inner join fetch m.roles r inner join fetch r.users u where u.id = ? order by m.priority ")
	List<Menu> findByUser(int id);

}
